﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SuperStarProject.Models.ProductModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Đăng sản phẩm mới
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript" language="javascript">
        function GetMaNhaCungCap() {
            var maNCC = document.getElementsByName("NhaCungCapListBox")[0].value;
            document.getElementsByName("MaNhaCungCap")[0].value = maNCC;
        }
    </script>
    <h2>Đăng sản phẩm mới</h2>

        <fieldset>
            <legend>Chọn nhà cung cấp</legend>
            <% Html.RenderAction("ShowAllNCC","NhaCungCap");%>
        </fieldset>
        
    <% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Fields</legend>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.MaSP) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.MaSP) %>
                <%= Html.ValidationMessageFor(model => model.MaSP) %>
            </div>
            
             <div class="editor-label">
                <%= Html.LabelFor(model => model.MaNhaCungCap) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.MaNhaCungCap, new { @readonly = "readonly"})%>
            </div>    
                 
                 
                <%= Html.HiddenFor(model => model.MaNhanVien) %>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.TenSP) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.TenSP) %>
                <%= Html.ValidationMessageFor(model => model.TenSP) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.HinhAnh) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.HinhAnh) %>
                <%= Html.ValidationMessageFor(model => model.HinhAnh) %>
            </div>
            
            <%--<div>Upload new image: <input type="file" name="Image" /></div>--%>
            <div class="editor-label">
                <%= Html.LabelFor(model => model.SoLuong) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.SoLuong) %>
                <%= Html.ValidationMessageFor(model => model.SoLuong) %>
            </div>
                        
            <div class="editor-label">
                <%= Html.LabelFor(model => model.DiemThuong) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.DiemThuong) %>
                <%= Html.ValidationMessageFor(model => model.DiemThuong) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.GiaTriTien) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.GiaTriTien) %>
                <%= Html.ValidationMessageFor(model => model.GiaTriTien) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.TGBatDauBan) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.TGBatDauBan) %>
                <%= Html.ValidationMessageFor(model => model.TGBatDauBan) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.TGKetThucBan) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.TGKetThucBan)%>
                <%= Html.ValidationMessageFor(model => model.TGKetThucBan) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.TGBatDauNhan)%>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.TGBatDauNhan) %>
                <%= Html.ValidationMessageFor(model => model.TGBatDauNhan) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.TGKetThucNhan) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.TGKetThucNhan)%>
                <%= Html.ValidationMessageFor(model => model.TGKetThucNhan) %>
            </div>
            

            
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

</asp:Content>

